package com.gxa.mapper.community;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.gxa.dto.communitydto.BuildingsDto;
import com.gxa.entity.community.Buildings;
import com.gxa.entity.community.Community;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yjl
 * @since 2022-10-11 10:05:38
 */
@Mapper
public interface BuildingsMapper extends BaseMapper<Buildings> {

    //通过id查询
    BuildingsDto getById(Integer id);
    //条件查询
    List<Buildings> queryAll(@Param("buildNum")String buildNum,@Param("buildName")String buildName);

    //分页条件查询
//    IPage<BuildingsDto> findByPage(IPage<BuildingsDto> page, @Param(Constants.WRAPPER) QueryWrapper<BuildingsDto> wrapper);

    //判断是否重复
    List<Buildings> queryByNum(@Param("build_num") String buildNum);
}
